# Contributor: Francesco Colista <fcolista@alpinelinux.org>
# Maintainer: Francesco Colista <fcolista@alpinelinux.org>
pkgname=yafic
pkgver=1.2.2
pkgrel=5
pkgdesc="Yet Another File Integrity Checker"
url="https://www.saddi.com/software/yafic/"
arch="all"
license="BSD-2-Clause"
makedepends="db-dev openssl-dev"
subpackages="$pkgname-doc"
source="https://prdownloads.sourceforge.net/$pkgname/$pkgname-$pkgver.tar.gz
	openssl-1.1.patch
	"
builddir="$srcdir/$pkgname-$pkgver"

check() {
	cd "$builddir"
	make check
}

build() {
	cd "$builddir"
	./configure \
		--prefix=/usr \
		--sysconfdir=/etc/yafic \
		--mandir=/usr/share/man
	make
}

package() {
	cd "$builddir"
	make DESTDIR="$pkgdir" install
	install -Dm0644 yafic.conf.sample "$pkgdir"/etc/yafic/yafic.conf
}


sha512sums="8e05a0838fc2063f1c6bb69d660e9ff5c9fbdc4199e1396232327498c04d037b35307c348d64d928e561875f5cf0ad40c24fd097680cd814b2308608cf738957  yafic-1.2.2.tar.gz
ffe7781f2f6cff56f5bd32da5329db45122f899d3be9857ec4c51aeeadd90f30fa335cfe9d94116b8cc20cb5384317f7b98eb6165e280419dc3d47abec2f9d9f  openssl-1.1.patch"
